import java.util.Scanner;

public class Ex5_6{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		System.out.print("Enter an integer: ");
		int num = input.nextInt();
		displayPattern(num);
	}

	public static void displayPattern(int n){
		for (int i = 1; i <= n; i++){
			for (int j = 1; j <= n - i; j++)
				System.out.printf("%2c", ' ');
			for (int j = i; j >= 1; j--)
				System.out.printf("%2d", j);
			System.out.printf("\n");
		}
	}
}
